package com.example.mapper;

import com.example.bean.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    User selectByUsernameAndPassword(User user);

    User selectById(int id);

    User selectByUsername(String username);

    User selectByEmail(String email);

    int insertUser(User user);

    void updateStatus(int id, int status);

    void updateRoleId(int id, int roleId);

    void updateHeaderUrl(int id, String headerUrl);

    void updatePassword(int id, String password);

    List<User> selectByConditions(String username, String email, int roleId, int status);

    void deleteUser(int id);
}
